.#{$pretty--class-name} {
    line-height: 1;
    position: relative;
    display: inline-block;
    margin: 0 10px 5px 0;
}

.#{$pretty--class-name} {
    label {
        font-weight: normal;
    }

    & > input[type='checkbox'],
    & > input[type='radio'] {
        position: absolute;
        z-index: 99999999;
        top: 0;
        left: 0;
        display: block;
        width: 100%;
        height: 100%;
        margin: 0;
        cursor: pointer;
        opacity: 0;
    }

    i {
        font-size: 1em !important;
        position: relative;
        display: inline-block;
        box-sizing: initial;
        min-width: 1em;
        margin-right: 2px;
        padding: 1px;
        text-align: center;

        &:before {
            position: relative;
            z-index: 999;
            left: 0;
            display: inline-block;
            vertical-align: bottom;
            color: transparent;
            background-color: $pretty--color-bg;
        }

        &:after {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            content: '\0000';
            color: transparent;
            border: 1px solid $pretty--color-border;
            border-radius: $pretty--border-radius;
        }
    }

    & > input[type='checkbox']:checked + label > i,
    & > input[type='radio']:checked + label > i {
        &:before {
            color: inherit;
            background-color: $pretty--color-bg;
        }
    }

    & > input[type='radio'] + label > i.default {
        &:before {
            left: 0;
            min-width: 1em;
            content: '\0000';
            color: transparent;
            border-radius: $pretty--border-radius;
            background: $pretty--color-bg;
            transform:scale(.8);
        }
    }

    & > input[type='radio']:checked + label > i.default {
        &:before {
            background-color: $pretty--color-radio !important;
        }
    }

    & > input[type='checkbox'][disabled],
    & > input[type='radio'][disabled] {
        cursor: not-allowed;
        opacity: 0;

        & + label {
            cursor: not-allowed;
            opacity: 0.5;
        }
    }
}
